package com.zan.springcloud.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @Author Zan
 * @Create 2023/12/8 19:52
 * @Description :
 */
@Configuration
public class RestTemplateConfig {

    /**
     * 使用@LoadBalanced注解赋予RestTemplate负载均衡的能力
     */
    @Bean
//    @LoadBalanced
    public RestTemplate getRestTemplate() {
        return new RestTemplate();
    }

}
